using System.Windows.Media;

namespace FluentSilverlight.Expressions.Font
{
    //NOTE: this is probablz not working as expected! Has to be discussed...
    public static class FontExtensions
    {
        public static THIS FontSize<THIS>(this THIS target, double size) where THIS : IFontProvider
        {
            target.FontSize = size;
            return target;
        }

        public static FontWeightExpression<THIS> FontWeight<THIS>(this THIS target) where THIS : IFontProvider
        {
            return new FontWeightExpression<THIS>(target, fw => target.FontWeight = fw);
        }

        public static THIS Foreground<THIS>(this THIS target, Color color) where THIS : IFontProvider
        {
            target.ForegroundBrush = new SolidColorBrush(color);
            return target;
        }
    }
}